-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add psalm template annotation to container get method #30498
Conversation
As I recently discovered, it seems like the |
Signed-off-by: Julius Härtl <jus@bitgrid.net>
ac108c4
to
987c53b
Compare
I added a commit that fixes the new issues reported by psalm. Please check it :) |
bff799b
to
e184c31
Compare
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
e184c31
to
623865c
Compare
@@ -1974,6 +1984,7 @@ public function getWebRoot() { | |||
* @deprecated 20.0.0 | |||
*/ | |||
public function getOcsClient() { | |||
/** @psalm-suppress UndefinedClass */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw this code looks broken since I couldn't find where the class or alias OcsClient
is defined. This, fortunately, doesn't seems to be called anywhere: http://carlschwan.eu:6070/search?q=OcsClient
Obsolete with #33388 |
Add psalm annotations in order to properly detect the return type of
\OC::$server->get(MyClass::class)
.Even though DI should be used, this allows to properly get the return type without manually specifiying it when using
get()